//
//  UIImage+Extension.h
//  YBInsurance
//
//  Created by S2 on 15/6/10.
//  Copyright (c) 2015年 YB. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (Extension)

+ (NSData *)compressImage:(UIImage *)image toByte:(NSUInteger)maxLength;

+ (UIImage *)clipImage:(UIImage *)image byWidth:(CGFloat)clipWidth height:(CGFloat)clipHeight;

//按指定size缩放(适合正方形图片)
- (UIImage *)scaleWithWidth:(CGFloat)width compressionQuality:(CGFloat)quality;

//按原始图片比例缩放
+ (UIImage *)thumbnailWithImageWithoutScale:(UIImage *)image size:(CGSize)asize;

+ (UIImage *)imageWithHexColor:(UIColor *)color;

- (UIImage*)imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize)newSize;

// 截取当前图片

@end
